package com.icloud.wallet.api.feign;


import com.icloud.common.core.api.CommonResult;
import com.icloud.wallet.api.dto.CustomerHotArticleDto;
import com.icloud.wallet.api.dto.CustomerRewardDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 用户钱包feign连接
 */
@FeignClient(value = "icloud-wallet", contextId = "customerOrderFeign", path="/wallet/internal/order")
public interface CustomerOrderFeign {

    /**
     * 打赏
     * @return
     */
    @PostMapping(value = "/article/reward")
    @ResponseBody
    CommonResult<Boolean> rewardArticle(@Validated @RequestBody CustomerRewardDto dto);

    @PostMapping(value = "/article/hot")
    @ResponseBody
    CommonResult<Boolean> hotArticle(@Validated @RequestBody CustomerHotArticleDto dto);
}
